<%= form_for(@objective, :data => {:abide => true}) do |f| %>
    <div class="field">
      <%= f.label :name %>
      <br/>
      <%= f.text_field :name,:required=>true %>
    </div>
    <div class="field">
      <%= f.label :start_date %>
      <br/>
      <%= f.text_field :start_date %>
    </div>
    <div class="field">
      <%= f.label :end_date %>
      <br/>
      <%= f.text_field :end_date %>
    </div>
    <h3>Tasks</h3>
    <div id="key_results">
      <%= f.fields_for :key_results do |kr| %>
          <%= render 'key_result_fields', :f => kr %>
      <% end %>
      <div class="links">
        <%= link_to_add_association 'add task', f, :key_results %>
      </div>
    </div>
    <%= f.submit %>
<% end %>



<script type="text/javascript">
    $('select').not('.select_add').select2({'width':'100%'});
    $('.date-input').datepicker();
</script>



